package com.lfy.aop;

import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Component;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 *  限流注解
 *
 * @author 吕飞扬
 * @date 2023/6/17 21:22
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
//@LimitingTestTow
public @interface LimitingTest {
    /**
     * 时间
     */
    int time() default 60;

    /**
     * 次数
     */

    int num() default 20;
//    @AliasFor(annotation = LimitingTestTow.class,attribute = "value()")
    String value() default "";

    String test() default "";
    /**
     * 时间单位
     */
    TimeUnit TIME_UNIT() default TimeUnit.SECONDS;

}
